vtd: Fix flush for SRTP and SIRTP set
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 16 Jun 2009 10:30:45 +0000 (11:30 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 16 Jun 2009 10:30:45 +0000 (11:30 +0100)
commit2e9127c7a5b339e1993e08d068836fdac04490cf
tree3e06eafa87144ce6e71516d8c38507e1d72622d5
parent7e03843de6ec294a28d742f5b657dd38a415485e
vtd: Fix flush for SRTP and SIRTP set

SRTP (Set Root Table Pointer) operation must be set before enable or
re-enable DMA remapping. And after set it, software must globally
invalidate the context-cache and then globally invalidate the
IOTLB. This is required to ensure hardware uses only the remapping
structures referenced by the new root-table pointer, and not stale
cached entries. Similarly, SIRTP (Set Interrupt Remap Table Pointer)
operation must be set before enable or re-enable Interrupt
remapping, and after set it, software must globally invalidate the
interrupt entry cache. This patch adds global context and iotlb
flush after set root entry, and globally flushs interrupt entry
cache before enabling Interrupt remapping. And remove the
iommu_flush_all in iommu_resume becuase it becomes redundant after
adds flush for SRTP in init_vtd_hw.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.c